<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\PhoneNumber
 *
 * @property int $id
 * @property int $owner_id
 * @property string $phone_number
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \App\Contact $contact
 * @method static \Illuminate\Database\Eloquent\Builder|\App\PhoneNumber newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\PhoneNumber newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\PhoneNumber query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\PhoneNumber whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\PhoneNumber whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\PhoneNumber whereOwnerId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\PhoneNumber wherePhoneNumber($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\PhoneNumber whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class PhoneNumber extends Model
{
    protected $touches = ['contact'];

    public function contact()
    {
        return $this->belongsTo(Contact::class, 'owner_id');
    }
}
